***Use Afrobarometer_JOP_23.dta

**Supporting this, trust in the president and ruling party are both negatively and significantly correlated with support for media freedom (b=-.08, p>.001 & **b=-.10, p>.001, respectively).

gen trustpres = Q41A
gen trustruling = Q41E
recode trustpres trustruling (-1=.) (8/94=.)

gen freemedia = Q19B
recode freemedia (1=4) (2=3) (3=1) (4=0) (5=2) (8/9=.)
label var freemedia "Govt control vs. free publish"
label values freemedia support

pwcorr trustpres freemedia, sig
pwcorr trustruling freemedia, sig

**Afrobarometer Round 8 data suggest that, while 89% in the four focus countries owned a mobile phone, men, urban-dwellers, and those with higher levels of formal education and lower levels of lived poverty were more likely to. 

tab Q92F [iweight=Combinwt_New]

gen age = Q1
replace age =. if Q1>997

gen female = Q101
recode female (1=0) (2=1)
label var female "Female"
label define gender 0 "Male" 1 "Female"
label values female gender

gen educ = Q97
replace educ =. if Q97==-1|Q97>10

gen mobile_personally = Q92F
recode mobile_personally (-1=.) (0/1=0) (2=1) (8/9=.)

gen urban = URBRUR
recode urban (1=1) (2/3=0)

logit mobile_personally female age educ LivedPoverty urban

***Indeed, 43% of Ivoirians said their former colonizer's influence was negative; far fewer said the same in Kenya (13%), Nigeria (9%), or Uganda (10%) (Afrobarometer Round 8)

fre Q70D if COUNTRY==8 & Q70D~=-1 & Q70D~=8
fre Q70D if COUNTRY==15 & Q70D~=-1 & Q70D~=8
fre Q70D if COUNTRY==35 & Q70D~=-1 & Q70D~=8
fre Q70D if COUNTRY==26 & Q70D~=-1 & Q70D~=8
display 29.33 + 13.33
display 4.05 + 8.47
display 3.45 + 6.98
display 3.08 + 5.52

***Interestingly, this might partially explain why subjects with higher trust of the opposition--who also tend to be more committed to democracy (b=.04, p<.01) (focus countries, Afrobarometer Round 8)...

gen trustopp = Q41F
recode trustopp (-1=.) (8/94=.)

gen reject_military = Q20B
recode reject_military (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var reject_military "Oppose Military Rule"
label values reject_military support_dem

gen reject_oneman = Q20C
recode reject_oneman (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var reject_oneman "Oppose One-Man Rule"
label values reject_oneman support_dem

gen reject_oneparty = Q20A
recode reject_oneparty (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var reject_oneparty "Oppose One-Party Rule"
label define support_dem 0 "Strongly anti-democracy" 1 "Somewhat anti-democracy" 2 "Neither" 3 "Somewhat pro-democracy" 4 "Strongly pro-democracy"
label values reject_oneparty support_dem

gen censor_false = Q58A
recode censor_false (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var censor_false "Govt Censor false info"
label define censor 0 "Strongly support censorship" 1 "Somewhat support censorship" 2 "Neither" 3 "Somewhat oppose censorship" 4 "Strongly oppose censorship"
label values censor_false censor

gen censor_disapprove = Q58B
recode censor_disapprove (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var censor_disapprove "Govt censor news it disapproves of"
label values censor_disapprove censor

gen censor_criticism = Q58C
recode censor_criticism (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var censor_criticism "Govt censor criticism of pres"
label values censor_criticism censor

gen censor_hate = Q58D
recode censor_hate (1=4) (2=3) (3=2) (4=1) (5=0) (8/9=.)
label var censor_hate "Govt censor Hate speech"
label values censor_hate censor

gen supdem = Q21
recode supdem (2=0) (3=2) (8/9=.)

egen reject_auth = rmean(reject_oneparty reject_military reject_oneman)
gen supportdem = (supdem*2)
egen committed = rmean(reject_auth supportdem)

pwcorr committed trustopp, sig

***************************
***Appendix A
***************************

***Trust in the president and support for media freedom are negatively and significantly correlated in three of the four focus countries (Côte d’Ivoire: b=-.12, p<.001; Kenya: b=-.07, p<.001; Uganda: b=-.14, p<.001). The two are negatively correlated in Nigeria, but not significantly so (b=-.03, p=.32).

pwcorr trustpres freemedia if COUNTRY==8, sig
pwcorr trustpres freemedia if COUNTRY==15, sig
pwcorr trustpres freemedia if COUNTRY==26, sig
pwcorr trustpres freemedia if COUNTRY==35, sig

***Trust in the ruling party and support for media freedom are negatively and significantly correlated in all four focus countries: (Côte d’Ivoire: b=-.12, p<.001; Kenya: b=-.10, p<.001; Nigeria: b=-.05, p=.06; Uganda: b=-.17, p<.001).

pwcorr trustruling freemedia if COUNTRY==8, sig
pwcorr trustruling freemedia if COUNTRY==15, sig
pwcorr trustruling freemedia if COUNTRY==26, sig
pwcorr trustruling freemedia if COUNTRY==35, sig

***Trust in the opposition and support for media freedom are not significantly correlated in Côte d’Ivoire (b=.00, p=.97) or Kenya (b=.02, p=.23), while they are positively and significantly correlated in Uganda (b=.13, p<.001). Surprisingly, they are negatively and significantly correlated in Nigeria (b=-.05, p=.04).

pwcorr trustopp freemedia if COUNTRY==8, sig
pwcorr trustopp freemedia if COUNTRY==15, sig
pwcorr trustopp freemedia if COUNTRY==26, sig
pwcorr trustopp freemedia if COUNTRY==35, sig

***************************
***Appendix J
***************************

gen ethhate = Q84C
recode ethhate (-1=.) (8/9=.)

gen CDINorth =0
replace CDINorth =1 if Q81==1264
replace CDINorth =1 if Q81==1262
replace CDINorth =. if COUNTRY~=8
replace CDINorth =. if Q81==9990 | Q81==9998 | Q81==9999

gen Fulani =0
replace Fulani =1 if Q81==625
replace Fulani =. if COUNTRY~=26
replace Fulani =. if Q81==9990 | Q81==9998 | Q81==9999

gen Kikuyu =0
replace Kikuyu =1 if Q81==300
replace Kikuyu=. if COUNTRY~=15
replace Kikuyu =. if Q81==9990 | Q81==9998 | Q81==9999

gen Banyankole =0
replace Banyankole =1 if Q81==781
replace Banyankole =. if COUNTRY~=35
replace Banyankole =. if Q81==9990 | Q81==9998 | Q81==9999

ttest ethhate, by(CDINorth)
ttest ethhate, by(Banyankole)
ttest ethhate, by(Kikuyu)
ttest ethhate, by(Fulani)

***************************
***Appendix N
***************************

ologit freemedia committed urban educ age female LivedPoverty i.COUNTRY, cluster (EANUMB_AB)
estimates store media_cmt

ologit censor_false committed urban educ age female LivedPoverty i.COUNTRY, cluster (EANUMB_AB)
estimates store false_cmt

ologit censor_disapprove committed urban educ age female LivedPoverty i.COUNTRY, cluster (EANUMB_AB)
estimates store dis_cmt

ologit censor_criticism committed urban educ age female LivedPoverty i.COUNTRY, cluster (EANUMB_AB)
estimates store crit_cmt

ologit censor_hate committed urban educ age female LivedPoverty i.COUNTRY, cluster (EANUMB_AB)
estimates store hate_cmt

coefplot (media_cmt, msize(small) label(Media freedom)) (false_cmt, msymbol(Sh) msize(small) label(Censor false info))(dis_cmt, msymbol(+) msize(small) label(Censor gov disapproves)) (crit_cmt, msymbol(x) msize(small) label(Censor pres critics))(hate_cmt, msymbol(o) msize(small) label(Censor hate speech)), bylabel(Democracy) ||, coeflabels(LivedPoverty = "Lived poverty" committed = "Committed to democracy") msize(small) keep(committed) xline(0) level(95) legend(size(small))

